package com.itheima.demo;


import java.io.IOException;

public class Demo1 {
    public static void main(String[] args) throws IOException {
        /*//获取核心配置文件
        InputStream is = Resources.getResourceAsStream("sqlConfig.xml");

        //创建SqlSessionFactory对象
        SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(is);

        //获取SqlSession
        SqlSession sqlSession = sqlSessionFactory.openSession();

        //获取代理对象
        UserMapper mapper = sqlSession.getMapper(UserMapper.class);

        //调用方法
        User user = mapper.findById(4);
        System.out.println(user);
        //提交事务
        sqlSession.commit();

        //关流
        sqlSession.close();*/
    }
}
